<!-- TOP NAVIGATION MENU FROM DATABASE-->
<?php
	global $xoopsDB, $xoopsModule, $xoopsConfig, $xoopsModuleConfig;
		//GET MOD CONFIG STUFF
		if (!isset($GLOBALS['xoopsModuleConfig']) || $GLOBALS['xoopsModule']->getVar('dirname') != "Top_Menu") {
		  $modhandler = &xoops_gethandler('module');
		  $module = &$modhandler->getByDirname("Top_Menu");
		  $config_handler = &xoops_gethandler('config');
		  $xoopsModuleConfig = &$config_handler->getConfigsByCat(0,$module->getVar('mid')); 
		}
		//END GET MOD CONFIG STUFF
		
		//GET DEFAULT MENU STYLE
		$result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("topmenu_styles")." WHERE `default` = 1");
		if($result){
			$myrow = $xoopsDB->fetchArray($result);
		}
		
		echo"<script type=\"text/javascript\" src=\"".XOOPS_URL."/modules/Top_Menu/include/transmenu_Packed.js\"></script>\n";

		
		//SET STYLE FOR MENU
		echo"<link rel='stylesheet' type='text/css' media='all' href='".XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/style.css' />\n";


$result = $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("tmenu")." WHERE hide=0 ORDER BY weight ASC");

$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');

	$x=0;
	while ( $myrow = $xoopsDB->fetchArray($result) ) {
		$data[$x][title] = $myrow['title'];
		$data[$x][target] = $myrow['target'];
		$data[$x][links] = $myrow['link'];
		$data[$x][module] = $myrow['module'];
		++$x;
    }//end while
	 
	 
	 if($xoopsModuleConfig['navDivision'] == 'equal'){
	 	$percent = "width=\"" . round((100/count($data))) . "%\"";
	 }else(
	 	$percent = "";
	 }
	 
?> 

<div id="wrap" style="text-align:<?PHP echo $xoopsModuleConfig['navAlign'];?>">
<table style='padding:0; margin:0; border:0;width:<?PHP echo $xoopsModuleConfig['navWidth'];?>;' cellpadding="0" cellspacing="0" id="menu" class="menu"> 
<tr id='menuRow'> 

<?PHP
	
for ($i = 0; $i < count($data); $i++) {
	if($data[$i]['module'] == $dirname){ 
		if($i == (count($data)-1)){//Currently active cell
			echo "<TD $percent></TD>";
		}else{
			echo "<TD $percent></TD> <td class='divider'>&nbsp;</td>"; 
		}
	}else{
		if($i == (count($data)-1)){
			echo "<TD class = 'last' $percent><A href=\"".$data[$i]['links']."\" TARGET=\"".$data[$i]['target']."\">" . $data[$i]['title'] . "</a></TD>"; 
		}else{
			echo "<TD $percent><A href=\"".$data[$i]['links']."\" TARGET=\"".$data[$i]['target']."\">" . $data[$i]['title'] . "</a></TD> <td class='divider'>&nbsp;</td>"; 
		} 
	} 

}	



?>
	<td> 
	<a id="menu17" href="http://juneaumusic.com/community/index.php" >Home</a>
	</td> 
<td class='divider' valign='middle' align='center'>&nbsp;</td>

	<td> 
	<a id="menu91" href="http://juneaumusic.com/community/index.php?option=com_content&amp;task=blogcategory&amp;id=0&amp;Itemid=91" >Hot News & Events</a>
	</td> 
	
<td class='divider' valign='middle' align='center'>&nbsp;</td>

	<td> 
	<a id="menu69" href="http://juneaumusic.com/community/index.php?option=com_content&amp;task=section&amp;id=17&amp;Itemid=69" >Menus</a>
	</td> 

<td class='divider' valign='middle' align='center'>&nbsp;</td>

	<td> 
	<a id="menu77" href="http://www.juneaumusic.com" >Post An Event or Article</a>
	</td> 

<td class='divider' valign='middle' align='center'>&nbsp;</td>
	
	<td> 
	<a id="menu55" href="http://juneaumusic.com/community/index.php?option=com_content&amp;task=blogsection&amp;id=14&amp;Itemid=55" >Alaskan Bands</a>
	</td> 

<td class='divider' valign='middle' align='center'>&nbsp;</td>
	
	<td class="last"> 
	<a id="menu67" href="http://juneaumusic.com/community/index.php?option=com_contact&amp;task=view&amp;contact_id=1&amp;Itemid=67" >Contact Us</a>
	</td> 

</tr> 
</table>
</div>

<div id="subwrap"> 
<script type="text/javascript">
<!--
if (TransMenu.isSupported()) {
var ms = new TransMenuSet(TransMenu.direction.down, 0,0, TransMenu.reference.bottomLeft);
var menu91 = ms.addMenu(document.getElementById("menu91"));
 menu91.addItem("Music", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=34&Itemid=47", "0");
var menu100088 = menu91.addMenu(menu91.items[0],0,0);
menu100088.addItem("Dates for the Official 2007 Pelican Boardwalk Boogie", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=88&Itemid=47", "0");
menu100088.addItem("Regsiter For Juneau Jazz & Classics Annual String Workshop March 3-4, 2007", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=86&Itemid=47", "0");
menu91.addItem("Film", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=37&Itemid=48", "0");
var menu92 = menu91.addMenu(menu91.items[1],0,0);
menu92.addItem("Gold Town Nickelodeon Theater", "http://juneaumusic.com/community/index.php?option=com_wrapper&Itemid=92", "0");
menu91.addItem("Theater", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=36&Itemid=49", "0");
menu91.addItem("Sports/Outdoors", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=39&Itemid=50", "0");
menu91.addItem("Dance", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=47&Itemid=62", "0");
var menu69 = ms.addMenu(document.getElementById("menu69"));
 menu69.addItem("Rainbow Foods Daily & Weekly", "http://juneaumusic.com/community/index.php?option=com_wrapper&Itemid=76", "0");
menu69.addItem("Costas Diner Special Dinners", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=56&Itemid=69", "0");
menu69.addItem("Costa\'s Diner Daily Specials", "http://juneaumusic.com/community/index.php?option=com_wrapper&Itemid=90", "0");
menu69.addItem("Silverbow Inn", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=54&Itemid=69", "0");
var menu77 = ms.addMenu(document.getElementById("menu77"));
 menu77.addItem("Add Event To Calendar", "http://www.juneaumusic.com/cgi-bin/calendar_admin.pl?calendar=goat&username=anonymous&template=add_edit_event.html", "1");
menu77.addItem("Submit Article", "http://juneaumusic.com/community/index.php?option=com_content&task=new&sectionid=13&Itemid=78", "0");
menu77.addItem("Submit a Weblink", "http://juneaumusic.com/community/index.php?option=com_weblinks&Itemid=79", "0");
var menu55 = ms.addMenu(document.getElementById("menu55"));
 menu55.addItem("Moseskane", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=64&Itemid=55", "0");
var menu100076 = menu55.addMenu(menu55.items[0],0,0);
menu100076.addItem("Moseskane / Bob Cole Finally Release CD!", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=76&Itemid=55", "0");
menu55.addItem("Fire on McGinnis", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=61&Itemid=55", "0");
var menu100063 = menu55.addMenu(menu55.items[1],0,0);
menu100063.addItem("Profile: Fire on McGinnis", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=63&Itemid=55", "0");
menu55.addItem("Salsa Borealis", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=46&Itemid=55", "0");
var menu100014 = menu55.addMenu(menu55.items[2],0,0);
menu100014.addItem("Salsa Borealis Photos and Videos", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=14&Itemid=55", "0");
menu55.addItem("Brave Monkey", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=45&Itemid=55", "0");
var menu100026 = menu55.addMenu(menu55.items[3],0,0);
menu100026.addItem("BRAVE monkey Photo Gallery", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=26&Itemid=55", "0");
menu55.addItem("Fleet Street", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=44&Itemid=55", "0");
var menu100040 = menu55.addMenu(menu55.items[4],0,0);
menu100040.addItem("Fleets Street Video and Photo Gallery", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=40&Itemid=55", "0");
menu55.addItem("Pandhandle Crab Grass", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=43&Itemid=55", "0");
var menu100002 = menu55.addMenu(menu55.items[5],0,0);
menu100002.addItem("Report from the Road: Crabgrass Pandhandle: NASHVEGAS", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=2&Itemid=55", "0");
menu55.addItem("The Vaporizers", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=42&Itemid=55", "0");
var menu100017 = menu55.addMenu(menu55.items[6],0,0);
menu100017.addItem("A Review of the Vaporizers (formerly Daddy-O) @ The Alaskan", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=17&Itemid=55", "0");
menu55.addItem("Bluegrass 101", "http://juneaumusic.com/community/index.php?option=com_content&task=blogcategory&id=41&Itemid=55", "0");
var menu100013 = menu55.addMenu(menu55.items[7],0,0);
menu100013.addItem("Bluegrass 101", "http://juneaumusic.com/community/index.php?option=com_content&task=view&id=13&Itemid=55", "0");
function init() {
if (TransMenu.isSupported()) {
TransMenu.initialize();
document.getElementById("menu17").onmouseover = function() {
ms.hideCurrent();
this.className = "hover";
}
document.getElementById("menu17").onmouseout = function() { this.className = ""; }
menu91.onactivate = function() {document.getElementById("menu91").className = "hover"; };
 menu91.ondeactivate = function() {document.getElementById("menu91").className = ""; };
 menu69.onactivate = function() {document.getElementById("menu69").className = "hover"; };
 menu69.ondeactivate = function() {document.getElementById("menu69").className = ""; };
 menu77.onactivate = function() {document.getElementById("menu77").className = "hover"; };
 menu77.ondeactivate = function() {document.getElementById("menu77").className = ""; };
 menu55.onactivate = function() {document.getElementById("menu55").className = "hover"; };
 menu55.ondeactivate = function() {document.getElementById("menu55").className = ""; };
 document.getElementById("menu67").onmouseover = function() {
ms.hideCurrent();
this.className = "hover";
}
document.getElementById("menu67").onmouseout = function() { this.className = ""; }
}}
TransMenu.spacerGif = "<?PHP echo XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/images/x.gif" ?>";
TransMenu.dingbatOn = "<?PHP echo XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/images/submenu-on.gif" ?>";
TransMenu.dingbatOff = "<?PHP echo XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/images/submenu-off.gif" ?>"; 
TransMenu.sub_indicator = true; 
TransMenu.menuPadding = 0;
TransMenu.itemPadding = 0;
TransMenu.shadowSize = 2;
TransMenu.shadowOffset = 3;
TransMenu.shadowColor = "#888";
TransMenu.shadowPng = "<?PHP echo XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/images/grey-40.png" ?>";
TransMenu.backgroundColor = "#bf5f46";
TransMenu.backgroundPng = "<?PHP echo XOOPS_URL."/modules/Top_Menu/stylepaks/".$myrow['styleDirectory']."/images/white-90.png" ?>";
TransMenu.hideDelay = 600;
TransMenu.slideTime = 300;
TransMenu.selecthack = 1;
TransMenu.renderAll();
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", init, false );
else if ( typeof window.attachEvent != "undefined" ) {
window.attachEvent( "onload", init);
}else{
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
init();
}
}else
window.onload = init();
}
}
-->
</script>


</div>